function [mF sF N] = firstPassTime(dt,t,g,D,A)
isplot = 0;
if nargin == 0
    dt = 0.0001;
    t = 0:dt:10;
    g = 1;
    D = 1;
    A = 1; %A = 0.1 ~ 1
    isplot = 1;
end
iter = 1000;
fpt = zeros(iter,1);
for i = 1: iter
x = OU(dt,t,g,D);
pass = find(x >  A);
if length(pass) > 1
    fpt(i) =  pass(1);
else
    fpt(i) = -1;
end
end
fpt(fpt == -1) = [];
mF = mean(fpt);
sF = std(fpt);
N = length(fpt);
if isplot
    plot(t,x);
end

